package com.tender.lc.integration.config.feign;

import feign.Feign;
import feign.RequestInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FeignCustomConfig {

    @Bean
    public RequestInterceptor customHeaderInterceptor() {
        return new HeaderInterceptor();
    }

    @Bean
    public Feign.Builder builder(RequestInterceptor customHeaderInterceptor) {
        return Feign.builder()
                .requestInterceptor(customHeaderInterceptor);
    }

    @Bean
    public feign.Logger.Level logLevel() {
        return feign.Logger.Level.FULL; // 设置日志级别为详细
    }

}
